package cn.iocoder.an.module.business.controller.admin.auditplanarea.vo;

import cn.iocoder.an.module.business.controller.admin.auditplandetail.vo.AuditPlanDetailRespVO;
import cn.iocoder.an.module.business.dal.dataobject.auditlevel.AuditLevelDO;
import cn.iocoder.an.module.business.dal.dataobject.auditplan.AuditPlanDO;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.VO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.time.LocalDate;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import cn.idev.excel.annotation.*;
import cn.iocoder.an.framework.excel.core.annotations.DictFormat;
import cn.iocoder.an.framework.excel.core.convert.DictConvert;

@Schema(description = "管理后台 - 审核计划区域 Response VO")
@Data
@ExcelIgnoreUnannotated
public class AuditPlanAreaRespVO implements VO {

    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "13627")
    @ExcelProperty("id")
    private Long id;

    @Trans(type = TransType.SIMPLE, target = AuditLevelDO.class,   fields = {"levelName"},refs = {"levelName"})
    private Long levelId;

    @Schema(description = "等级", example = "18133")
    private String levelName;

    @Schema(description = "计划", example = "7026")
    @ExcelProperty("计划")
    @Trans(type = TransType.SIMPLE, target = AuditPlanDO.class,   fields = {"belongType"},refs = {"belongType"})
    private Long planId;

    @Schema(description = "区域", example = "23388")
    @ExcelProperty("区域")
    private Long areaId;

    @Schema(description = "审核开始日期")
    @ExcelProperty("审核开始日期")
    private LocalDate auditStartDate;

    @Schema(description = "审核结束日期")
    @ExcelProperty("审核结束日期")
    private LocalDate auditEndDate;

    @Schema(description = "审核人", example = "8043")
    @ExcelProperty("审核人")
    private List<Long> auditUserId;

    @Schema(description = "状态", example = "2")
    @ExcelProperty(value = "状态", converter = DictConvert.class)
    @DictFormat("audit_plan_status") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer status;


    @Schema(description = "填报状态", example = "2")
    @ExcelProperty(value = "填报状态", converter = DictConvert.class)
    @DictFormat("write_status") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer writeStatus;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "区域名称", example = "李四")
    @ExcelProperty("区域名称")
    private String areaName;

    @Schema(description = "重要工序")
    @ExcelProperty("重要工序")
    private String importantProcesses;

    @Schema(description = "近期问题")
    @ExcelProperty("近期问题")
    private String recentlyProblem;

    @Schema(description = "填报人", example = "7973")
    @ExcelProperty("填报人")
    private Long writeUserId;

    @Schema(description = "填报人", example = "李四")
    @ExcelProperty("填报人")
    private String writeUserName;

    @Schema(description = "填报时间")
    @ExcelProperty("填报时间")
    private LocalDateTime writeTime;

    @Schema(description = "下发人", example = "17396")
    @ExcelProperty("下发人")
    private Long sendUserId;

    @Schema(description = "下发人", example = "芋艿")
    @ExcelProperty("下发人")
    private String sendUserName;

    @Schema(description = "下发时间")
    @ExcelProperty("下发时间")
    private LocalDateTime sendTime;

    @Schema(description = "所属范围", example = "1")
    @ExcelProperty(value = "所属范围", converter = DictConvert.class)
    @DictFormat("belong") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer belongType;


    private String auditUserName;

    //对应的审核项
    private List<AuditPlanDetailRespVO> detailList;



}